import Vue from "vue";
import App from "./App.vue";
import router from "./router";
import store from "./store";
import "./assets/css/global.css";
import "./plugins/element.js";
import "element-ui/lib/theme-chalk/index.css";
import "./assets/font/style.css"

Vue.config.productionTip = false;
Vue.filter("timer", function(value) {
  const value1 = value.slice(0, 2);
  const value2 = value.slice(2, 4);
  return `${value1}:${value2}`;
});
Vue.filter("duration", function(value) {
  const value1 = value.slice(0, 2);
  const value2 = value.slice(3, 5);
  return `${value1}小时${value2}分钟`;
});
Vue.filter("mobile", function(value) {
  const value1 = value.slice(0, 3);
  const value2 = value.slice(-4);
  return `${value1}****${value2}`;
});
Vue.filter("identity", function(value) {
  const value1 = value.slice(0, 2);
  const value2 = value.slice(-3);
  return `${value1}****${value2}`;
});
Vue.filter("hotel", function(value) {
  if (value) {
    var ht1 = value.split("Hotel酒店名称:")[1];
    var ht2 = ht1.split("Check In(入住):");
    return ht2[0].replace(/\s/g, "");
  }else{
    return ''
  }
});
new Vue({
  router,
  store,
  render: h => h(App)
}).$mount("#app");
